import { createRouter, createWebHistory } from 'vue-router'
import Reg from '../pages/Reg.vue';
import Login from '../pages/Login.vue';
import Manage from '../pages/Manage.vue';
import Student from '../pages/student/index.vue';
import Class from '../pages/class/index.vue';
import Teacher from '../pages/teacher/index.vue';
import Test from '../pages/Test.vue';
import Test1 from '../pages/Test1.vue';
import Parent from '../pages/Parent.vue';
import TestCount from '../pages/TestCount.vue';
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/count',
      name: 'TestCount',
      component: TestCount
    },
    {
      path: '/parent',
      name: 'parent',
      component: Parent
    },
    {
      path: '/test',
      name: 'test',
      component: Test
    },
    {
      path: '/test1',
      name: 'test1',
      component: Test1
    },
    {
      path: '/reg',
      name: 'reg',
      component: Reg
    },
    {
      path: '/login',
      name: 'login',
      component: Login
    },
    {
      path: '/manage',
      name: 'manage',
      component: Manage,
      children:[
        {
          path: 'student',
          name: 'student',
          component: Student
        },
        {
          path: 'class',
          name: 'class',
          component: Class
        },
        {
          path: 'teacher',
          name: 'teacher',
          component: Teacher
        }
      ]
    },
  ]
})

export default router
